package com.example.rabbitmqspringboot.config;

import com.example.rabbitmqspringboot.constant.ConfirmQueueConstant;
import org.springframework.amqp.core.*;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ConfirmQueueConfig {
    /*//声明发布确认队列
    @Bean("confirmQueue")
    public Queue confirmQueue() {
        return QueueBuilder.durable(ConfirmQueueConstant.CONFIRM_QUEUE).build();
    }

    //声明发布确认交换机
    @Bean("confirmExchange")
    public DirectExchange confirmExchange() {
        return new DirectExchange(ConfirmQueueConstant.CONFIRM_EXCHANGE);
    }*/

    //绑定队列和交换机
    /*@Bean
    public Binding confirmQueueBinding(@Qualifier("confirmQueue") Queue confirmQueue,
                                       @Qualifier("confirmExchange") DirectExchange confirmExchange) {
        return BindingBuilder
                .bind(confirmQueue)
                .to(confirmExchange)
                .with(ConfirmQueueConstant.CONFIRM_ROUTING_KEY);
    }*/


}
